package com.yami.shop.webservice.common.service.impl;

import com.yami.shop.bean.model.EntrustVo;
import com.yami.shop.webservice.common.dao.SubmittedEntrustMapper;
import com.yami.shop.webservice.common.service.WapiSubmittedEntrustService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;

@Service
public class WapiSubmittedEntrustServiceImpl implements WapiSubmittedEntrustService {
    private final Logger log = LoggerFactory.getLogger(this.getClass());

    @Autowired
    private SubmittedEntrustMapper submittedEntrustMapper;

    @Override
    public int insertEntrustVoList(List<EntrustVo> entrustVoList) {
        for (EntrustVo entrustVo: entrustVoList) {
            entrustVo.setCreateTime(new Date());
        }
        return submittedEntrustMapper.insertEntrustVoList(entrustVoList);
    }
}
